<script setup lang="ts">
//需要引入路由
import {RouterView,RouterLink} from 'vue-router'

</script>

<template>
  <!--导航区-->
  <div class="navigate">
    <RouterLink to="/lesson1" active-class="active">lesson1</RouterLink>
    <RouterLink to="/lesson2" active-class="active">lesson2</RouterLink>
    <RouterLink to="/lesson3" active-class="active">lesson3[setup]</RouterLink>
    <RouterLink to="/lesson4" active-class="active">lesson4[setup与OptionsAPI]</RouterLink>
    <RouterLink to="/lesson5" active-class="active">lesson5[组合式]</RouterLink>
    <RouterLink to="/lesson6" active-class="active">lesson6[ref基本类型]</RouterLink>
    <RouterLink to="/lesson7" active-class="active">lesson7[reactive对象类型]</RouterLink>
    <RouterLink to="/lesson8" active-class="active">lesson8[ref对象类型]</RouterLink>
    <RouterLink to="/lesson10" active-class="active">lesson10[watch]</RouterLink>
  </div>
  <!--展示区-->
  <div class="main-content">
    <!--显示路由内容 -->
    <RouterView>

    </RouterView>
  </div>
</template>

<style scoped>
.title{
  text-align: center;
  word-spacing: 5px;
  margin:30px 0;
  height: 70px;
  line-height: 70px;
  background-image: linear-gradient(45deg, gray, white);
  border-radius: 10px;
  box-shadow: 0 0 2px;
  font-size: 30px;
}
.navigate{
  display: flex;
  flex-wrap: true;
  flex-direction: column;
  justify-content: space-around;
  margin:0 100px;
}
.navigate a{
  display: block;
  text-align: center;
  width: auto;
  height: 30px;
  line-height: 30px;
  border-radius: 10px;
  text-decoration: none;
  color:#271f14;
  font-size: 15px;
  letter-spacing: 1px;
  border:1px solid #64967e;
  box-shadow: 0 0 3px black;
}
.navigate a.active{
  background-color: #64967e;
  color: #ffc268;
  font-weight:900;
  text-shadow: 0 0 1px black;
  box-shadow: 0 0 10px black;
  font-family:'Courier New', Courier, monospace;
}
.main-content{
  margin:0 auto;
  margin-top:30px;
  border-radius: 10px;
  width: 90%;
  min-width: 600px;
  height:400px;
  border: 1px solid;
  box-shadow: 0 0 10px;

}
</style>
